package com.bs.modules.app.service;


import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import com.bs.common.utils.R;
import com.bs.modules.app.entity.UserEntity;
import com.bs.modules.app.form.LoginForm;
import com.bs.modules.use.entity.AppUserEntity;

/**
 * 用户
 *
 * @author Mark sunlightcs@gmail.com
 */
public interface UserService extends IService<UserEntity> {

	UserEntity queryByMobile(String mobile);

	/**
	 * 用户登录
	 * @param form    登录表单
	 * @return        返回用户ID
	 */
	long login(LoginForm form);

  JSONObject jscode2session(String appId, String secret, String jsCode) throws Exception;

	AppUserEntity findAppUser(Object appId);

	AppUserEntity findUserId(Long userId);

	void bingUserId(Object openid, Object userId);
}
